Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Public FlashContents As New Collection
Public LoadedByRecord As Boolean
Public MenuRecords As Integer
Public OpenFile As String
Public RecentFileList As New Collection
Public Saved As Boolean
Public SelRecord As Integer
Public CardsPosition As Integer
Global Const BEGINCHARS = "-->>:"
Global Const ERRTAG = "//*ERR//"
Global Const HEADING = "FILEREC"
Global Const HDRECNUM = "ENTRYCOUNT"
Global Const INVCHARERR = "Cannot add entry: invalid characters."
Global Const MAXRECORDNUM = 4
Global Const MESSAGE = "Save changes to this file?"
Global Const MSGDEF = " Definition"
Global Const MSGSHOW = "Show"
Global Const MSGWRD = " Word"
Global Const NOMCHNG = "aeioun!?"
Global Const NOMTAG = "+^"
Global Const RECORDINI = "FSOFT.INI"
Global Const SECTION = "FLASHCARD"
Global Const SEPCHARS = "::"
Global Const SEPCHAR = ";"
Function AreEntries() As Boolean
AreEntries = FlashContents.Count > 0
End Function
Public Sub CheckForAccents(txtObject As TextBox)
Dim Letter As String, i As Integer
i = InStr(1, txtObject, NOMTAG)
If i > 0 Then
Letter = Right(Left(txtObject, i - 1), 1)
txtObject.SelStart = i - 2
txtObject.SelLength = 3
If InStr(1, NOMCHNG, Letter) = 0 Then
txtObject.SelStart = i - 1
txtObject.SelLength = 2
txtObject.SelText = ""
Exit Sub
End If
Select Case Letter
Case "a"
txtObject.SelText = "ß"
Case "e"
txtObject.SelText = "Θ"
Case "i"
txtObject.SelText = "φ"
Case "o"
txtObject.SelText = "≤"
Case "u"
txtObject.SelText = "·"
Case "n"
txtObject.SelText = "±"
Case "!"
txtObject.SelText = "í"
Case "?"
txtObject.SelText = "┐"
End Select
End If
End Sub
Public Sub CloseFile()
OpenFile = ""
Cards.ChangeMode False
DeleteEntries FlashContents
End Sub
Public Sub DeleteEntries(ByRef DeleteCol As Collection)
Dim i As Integer
For i = DeleteCol.Count To 1 Step -1
DeleteCol.Remove i
Next i
End Sub
Function IsOpenFile() As Boolean
IsOpenFile = (OpenFile <> "")
End Function
Public Function GetFileContents(FileName As String) As Boolean